package main

import (
	"fmt"
	"time"
)

func netTask() {
	for {
		fmt.Println("this is a newTask")
		time.Sleep(time.Second) //延迟1s
	}
}

func main() {
	go netTask() //新建一个协程，新建一个任务
	for {
		fmt.Println("this is a main goroutine")
		time.Sleep(time.Second) //延迟1s
	}

}
